package com.lhb.aicodemother.ai.model.message;

import com.lhb.aicodemother.ai.model.enums.StreamMessageTypeEnum;
import dev.langchain4j.agent.tool.ToolExecutionRequest;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

/*
* 工具调用消息
* */
@Data
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
public class ToolRequestMessage extends StreamMessage {
    private String id;
    private String name;
    private String argument;
    public ToolRequestMessage(ToolExecutionRequest toolExecutionRequest){
        super(StreamMessageTypeEnum.TOOL_REQUEST.getValue());
        this.id = toolExecutionRequest.id();
        this.name = toolExecutionRequest.name();
        this.argument = toolExecutionRequest.arguments();
    }
}
